<?php
class Default_Model_User extends Zend_Db_Table_Abstract
{
	public function add($fullname,$username,$pass,$address,$phone,$email,$id_group,$folder)
	{
		$db = Zend_Registry::get('connectDB');
		$data = array('fullname'=>$fullname,'username'=>$username,'password'=>md5($pass),'email'=>$email,'address'=>$address,'phone'=>$phone,'id_group'=>$id_group,'folder_user'=>$folder);
		$insert = $db->insert('users',$data);
		return $insert;
	}
	public function updatestat($id,$status)
	{
		$db = Zend_Registry::get('connectDB');
		$data = array('status'=>$status);
		$where = $db->quoteInto('id_user =?',$id);
		$update = $db->update('users',$data,$where);
		return $update;
	}
}